# ifndef __MapSendFile_H_
# define __MapSendFile_H_

# ifdef _MSC_VER
#	pragma pack (push, 1)
# endif

const char c_strMapSendSignature30 [] = "4D533330 MS";
const char c_strMapSendSignature34 [] = "4D533334 MS";
const char c_strMapSendSignature36 [] = "4D533336 MS";

enum CMapSendType {
	mstRegion = 0,
	mstWaypointRoutes = 1,
	mstTrack = 2,
	mstGPSLog = 3
};

struct CMapSendHdr {
	BYTE  btLen;
	char  strSignature [11];
	char  strVersion [2];
	DWORD dwType;
};

struct CMapSendWaypoint {
	// * Name
	// * Comment

	DWORD dwNumber;

	BYTE   btIcon;   // 0 - 41
	BYTE   btStatus; // 0 - off, 1 - on, not used in routes, 2 - on, used in routes

	double dblAltitude;
	double dblX;
	double dblY;
};

struct CMapSendRoute {
	// * Name

	DWORD dwNumber;

	DWORD dwWaypoints;
};

struct CMapSendRoutePoint {
	// * Name

	DWORD dwNumber;

	double dblX;
	double dblY;

	BYTE   btIcon;   // 0 - 41
};

struct CMapSendTrackPoint {
	double dblX;
	double dblY;

	union {
		LONG  lAltitude; // ver < 4.0
		float fAltitude; // ver >= 4.0
	};

	time_t tmTime;
	DWORD dwValid;
};

struct CMapSendTrackPoint2 : public CMapSendTrackPoint {
	BYTE  btCentiseconds; // ver >= 3.0
};

# ifdef _MSC_VER
#	pragma pack (pop)
# endif

# endif // __MapSendFile_H_